package kr.zetaomicron.ultrasolitaire;

import android.util.Log;

class Card {
	public static final int CLUBS = 0, DIAS = 1, SPADES = 2, HEARTS = 3;
	public static final int WATERDROPS = 4, FLAMES = 5, BUBBLES = 6, SPROUTS = 7;

	public static final int ACE = 1;
	public static int JACK = 11, QUEEN = 12, KING = 13;
	public static final String TEXT[] = {
		"A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"
	};

	//public static int WIDTH = 220, HEIGHT = 140;
	public static int HI_RATIO = 10;	// Card HEIGHT / Card to Card INTERVAL ratio
	public static int HEIGHT = (int)((float)(Settings.WORLD_HEIGHT - Settings.BTN_SCROLL_WIDTH * 2) / Settings.columnNum * HI_RATIO / (HI_RATIO + 1));
	public static int WIDTH = (int)((float)HEIGHT / 7.0f * 11.0f);

	private int mValue;
	private int mSuit;
	private float mX, mY;

	public Card(int value, int suit) {
		mValue = value;
		mSuit = suit;
		mX = 1;
		mY = 1;
	}

	public float GetX() {	return mX;	}
	public float GetY() {	return mY;	}
	public int GetValue() {	return mValue;	}
	public int GetSuit() {	return mSuit;	}

	public static void Resize() {
		HEIGHT = (int)((float)(Settings.WORLD_HEIGHT - Settings.BTN_SCROLL_WIDTH * 2) / Settings.columnNum * HI_RATIO / (HI_RATIO + 1));
		WIDTH = (int)((float)HEIGHT / 7.0f * 11.0f);
	}

	public static void SetFaceValue(int rank_king) {	KING = rank_king;	QUEEN = rank_king - 1;	JACK = rank_king - 2;	}
	public void SetPosition(float x, float y) {
		mX = x;	mY = y;
	}

	public void MovePosition(float dx, float dy) {
		mX -= dx;	mY -= dy;
	}
}